-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add command to move files with LSP support #8584
Conversation
7ffa81e
to
88b3653
Compare
Can you keep the commit history and retain the original author then? If the PR is simply rebased or patched up I'd like to retain the original author so we properly attribute the work they've put in. |
It's a big change compared to the code I had, this adds multiple lsp server support and it handles it properly unlike mine |
Co-authored-by: Pascal Kuthe <[email protected]>
Co-authored-by: Pascal Kuthe <[email protected]>
Co-authored-by: Pascal Kuthe <[email protected]>
Co-authored-by: Pascal Kuthe <[email protected]>
Co-authored-by: Pascal Kuthe <[email protected]>
Co-authored-by: Pascal Kuthe <[email protected]>
Couldn't have manage the lsp thing without seeing how it was implemented in your PR :) |
624977c
to
5807113
Compare
this will probably need to wait for the next release, the current one is pretty close and I doubt we will merge new features before it |
Shouldn't this command allow to move files into directories by automatically adding the filename? Currently you have to manually type the filename if you want to move the buffer into a directory |
I just tried this with ltex-ls and immediate problems :(
(create some text and save)
if you use move too fast (before the language server has finished working I assume) you get an error like:
If you wait for ltex-ls to fully load before moving then the new file then you get 'no code actions available' but the text seems to have inherited the old underline errors? Anyway, something funny is going on with the language server in this case. I am running ltex-ls and marksman. Cheers. |
That is a language server problem. What we do on our side is quite trivial |
* Added rename command * Added an error if the new path already exists * Fixed wrong command name being used * fixed clippy suggestions * removed didRenameFiles call, fixed early return due to path Err * added ':rnm' alias to ':rename' * code cleanup * formatting * removed debug line * cargo fmt * Improved new buffer error message Co-authored-by: Pascal Kuthe <[email protected]> * Removed unnecessary path normalizing Co-authored-by: Pascal Kuthe <[email protected]> * Update helix-term/src/commands/typed.rs Co-authored-by: Pascal Kuthe <[email protected]> * Update helix-term/src/commands/typed.rs Co-authored-by: Pascal Kuthe <[email protected]> * Update helix-term/src/commands/typed.rs Co-authored-by: Pascal Kuthe <[email protected]> * Update helix-term/src/commands/typed.rs Co-authored-by: Pascal Kuthe <[email protected]> * feat: change `rename` command to `move` * feat: add multi lsp support when moving files * feat: allow lsp calls with a custom timeout * feat: sending lsp file_changed event once file has moved --------- Co-authored-by: ontley <[email protected]> Co-authored-by: ontley <[email protected]> Co-authored-by: Pascal Kuthe <[email protected]>
* Added rename command * Added an error if the new path already exists * Fixed wrong command name being used * fixed clippy suggestions * removed didRenameFiles call, fixed early return due to path Err * added ':rnm' alias to ':rename' * code cleanup * formatting * removed debug line * cargo fmt * Improved new buffer error message Co-authored-by: Pascal Kuthe <[email protected]> * Removed unnecessary path normalizing Co-authored-by: Pascal Kuthe <[email protected]> * Update helix-term/src/commands/typed.rs Co-authored-by: Pascal Kuthe <[email protected]> * Update helix-term/src/commands/typed.rs Co-authored-by: Pascal Kuthe <[email protected]> * Update helix-term/src/commands/typed.rs Co-authored-by: Pascal Kuthe <[email protected]> * Update helix-term/src/commands/typed.rs Co-authored-by: Pascal Kuthe <[email protected]> * feat: change `rename` command to `move` * feat: add multi lsp support when moving files * feat: allow lsp calls with a custom timeout * feat: sending lsp file_changed event once file has moved --------- Co-authored-by: ontley <[email protected]> Co-authored-by: ontley <[email protected]> Co-authored-by: Pascal Kuthe <[email protected]>
* Added rename command * Added an error if the new path already exists * Fixed wrong command name being used * fixed clippy suggestions * removed didRenameFiles call, fixed early return due to path Err * added ':rnm' alias to ':rename' * code cleanup * formatting * removed debug line * cargo fmt * Improved new buffer error message Co-authored-by: Pascal Kuthe <[email protected]> * Removed unnecessary path normalizing Co-authored-by: Pascal Kuthe <[email protected]> * Update helix-term/src/commands/typed.rs Co-authored-by: Pascal Kuthe <[email protected]> * Update helix-term/src/commands/typed.rs Co-authored-by: Pascal Kuthe <[email protected]> * Update helix-term/src/commands/typed.rs Co-authored-by: Pascal Kuthe <[email protected]> * Update helix-term/src/commands/typed.rs Co-authored-by: Pascal Kuthe <[email protected]> * feat: change `rename` command to `move` * feat: add multi lsp support when moving files * feat: allow lsp calls with a custom timeout * feat: sending lsp file_changed event once file has moved --------- Co-authored-by: ontley <[email protected]> Co-authored-by: ontley <[email protected]> Co-authored-by: Pascal Kuthe <[email protected]>
* Added rename command * Added an error if the new path already exists * Fixed wrong command name being used * fixed clippy suggestions * removed didRenameFiles call, fixed early return due to path Err * added ':rnm' alias to ':rename' * code cleanup * formatting * removed debug line * cargo fmt * Improved new buffer error message Co-authored-by: Pascal Kuthe <[email protected]> * Removed unnecessary path normalizing Co-authored-by: Pascal Kuthe <[email protected]> * Update helix-term/src/commands/typed.rs Co-authored-by: Pascal Kuthe <[email protected]> * Update helix-term/src/commands/typed.rs Co-authored-by: Pascal Kuthe <[email protected]> * Update helix-term/src/commands/typed.rs Co-authored-by: Pascal Kuthe <[email protected]> * Update helix-term/src/commands/typed.rs Co-authored-by: Pascal Kuthe <[email protected]> * feat: change `rename` command to `move` * feat: add multi lsp support when moving files * feat: allow lsp calls with a custom timeout * feat: sending lsp file_changed event once file has moved --------- Co-authored-by: ontley <[email protected]> Co-authored-by: ontley <[email protected]> Co-authored-by: Pascal Kuthe <[email protected]>
* Added rename command * Added an error if the new path already exists * Fixed wrong command name being used * fixed clippy suggestions * removed didRenameFiles call, fixed early return due to path Err * added ':rnm' alias to ':rename' * code cleanup * formatting * removed debug line * cargo fmt * Improved new buffer error message Co-authored-by: Pascal Kuthe <[email protected]> * Removed unnecessary path normalizing Co-authored-by: Pascal Kuthe <[email protected]> * Update helix-term/src/commands/typed.rs Co-authored-by: Pascal Kuthe <[email protected]> * Update helix-term/src/commands/typed.rs Co-authored-by: Pascal Kuthe <[email protected]> * Update helix-term/src/commands/typed.rs Co-authored-by: Pascal Kuthe <[email protected]> * Update helix-term/src/commands/typed.rs Co-authored-by: Pascal Kuthe <[email protected]> * feat: change `rename` command to `move` * feat: add multi lsp support when moving files * feat: allow lsp calls with a custom timeout * feat: sending lsp file_changed event once file has moved --------- Co-authored-by: ontley <[email protected]> Co-authored-by: ontley <[email protected]> Co-authored-by: Pascal Kuthe <[email protected]>
close #4393
Allows to rename the active buffer by moving it to another path.
Heavily based on all the work done in #5531 by @ontley and apply the suggestions
The PR seems dead and I would really like to see that feature come into helix :)